/*
 * @Author       : Hejh(3010733382@qq.com)
 * @Version      : V1.0
 * @Date         : 2024-01-29 18:13:21
 * @Description  : 后台管理页面路由
 */
import type { RouteRecordRaw } from 'vue-router'
const AdminRoutes: RouteRecordRaw[] = [
  {
    path: '/admin',
    name: 'admin',
    redirect: '/admin/index',
    component: () => import('@/views/Admin/index.vue'),
    children: [
      {
        path: 'index',
        name: 'overview',
        meta: {
          icon: 'icon-bar-graph',
          title: '概览',
          auth: 'admin.index.dashborad'
        },
        component: () => import('@/views/Admin/Overview/index.vue')
      },
      {
        path: 'settings/index/:page?',
        name: 'settings',
        meta: {
          icon: 'settings',
          title: '基础设置',
          auth: 'admin.index.setting'
        },
        component: () => import('@/views/Admin/Setting/index.vue')
      },
      {
        path: 'settings/notice',
        name: 'notice',
        meta: {
          icon: 'tongzhi',
          title: '通知管理',
          auth: 'admin.index.setting'
        },
        component: () => import('@/views/Admin/Setting/Notice/index.vue')
      },
      {
        path: 'user',
        name: 'user',
        meta: {
          icon: 'yonghu',
          title: '部门及用户',
          auth: 'admin.dep.list'
        },
        component: () => import('@/views/Admin/Dep/User/index.vue')
      },
      {
        path: 'role',
        name: 'role',
        meta: {
          icon: 'quanxian',
          title: '系统权限管理',
          auth: 'admin.role.list'
        },
        component: () => import('@/views/Admin/Dep/Role/index.vue')
      },
      {
        path: 'auth',
        name: 'auth',
        meta: {
          icon: 'yewuquanxian',
          title: '文档权限管理',
          auth: 'admin.sourceAuth.list'
        },
        component: () => import('@/views/Admin/Dep/Auth/index.vue')
      },
      {
        path: 'storage/index',
        name: 'storageOrigin',
        meta: {
          icon: 'cunchujuan',
          title: '存储管理',
          auth: 'admin.storage.list'
        },
        component: () => import('@/views/Admin/Storage/index.vue')
      },
      {
        path: 'storage/share',
        name: 'share',
        meta: {
          icon: 'rizhi',
          title: '分享管理',
          auth: 'admin.storage.list'
        },
        component: () => import('@/views/Admin/Storage/Share/index.vue')
      },
      {
        path: 'storage/backup',
        name: 'backup',
        meta: {
          icon: 'icon_cloudnode_fill',
          title: '备份管理',
          auth: 'admin.storage.list'
        },
        component: () => import('@/views/Admin/Storage/BackUp/index.vue')
      },
      // {
      //   path: 'tools/warning',
      //   name: 'warning',
      //   meta: {
      //     icon: 'gaojing',
      //     title: '消息预警',
      //     auth: 'admin.index.setting'
      //   },
      //   component: () => import('@/views/Admin/Log/Warning/index.vue')
      // },
      {
        path: 'log',
        name: 'log',
        meta: {
          icon: 'denglu',
          title: '操作日志',
          auth: 'admin.index.log'
        },
        component: () => import('@/views/Admin/Log/index.vue')
      },
      {
        path: 'Logdl',
        name: 'loginLog',
        meta: {
          icon: 'denglu',
          title: '登录日志',
          auth: 'admin.index.loginLog'
        },
        component: () => import('@/views/Admin/Log/LoginLog/index.vue')
      },
      {
        path: 'scheduleTask',
        name: 'scheduleTask',
        meta: {
          icon: 'jihuarenwu',
          title: '计划任务',
          auth: 'admin.schedule.list'
        },
        component: () => import('@/views/Admin/Schedule/index.vue')
      }
    ]
  }
]

export default AdminRoutes
